package com.xinghou.platform.model.main;

import java.io.Serializable;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;


/**
 * 
 * @author xuzhen
 *
 */
@Document(collection = "userLocation_Geo")
public class UserLocation_Geo implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	private ObjectId _id;
	@Indexed
	private Integer userId;
	@Indexed
	private Integer userType;
	private String cityCode;
	private Double[] pos;
	private String deviceId;
	@Indexed
	private Integer storeid;
	@Indexed
	private Long lastLoginTime;
	
	public UserLocation_Geo(){
		
	}
	
	@PersistenceConstructor
	public UserLocation_Geo(ObjectId _id, Integer userId,Integer userType,String cityCode, Double[] pos, String deviceId,Integer storeid,Long lastLoginTime){
		this._id = _id;
		this.userId = userId;
		this.userType = userType;
		this.cityCode = cityCode;
		this.pos = pos;
		this.deviceId = deviceId;
		this.storeid = storeid;
		this.lastLoginTime = lastLoginTime;
	}

	/**
	 * @return the lastLoginTime
	 */
	public Long getLastLoginTime() {
		return lastLoginTime;
	}

	/**
	 * @param lastLoginTime the lastLoginTime to set
	 */
	public void setLastLoginTime(Long lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	/**
	 * @return the pos
	 */
	public Double[] getPos() {
		return pos;
	}

	/**
	 * @param pos the pos to set
	 */
	public void setPos(Double[] pos) {
		this.pos = pos;
	}

	/**
	 * @return the cityCode
	 */
	public String getCityCode() {
		return cityCode;
	}

	/**
	 * @param cityCode the cityCode to set
	 */
	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public ObjectId get_id() {
		return _id;
	}

	public void set_id(ObjectId _id) {
		this._id = _id;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public Integer getStoreid() {
		return storeid;
	}

	public void setStoreid(Integer storeid) {
		this.storeid = storeid;
	}

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

}
